//
//  HomeCommendModel.m
//  Shengzhuli
//
//  Created by FXGuo on 2018/3/15.
//  Copyright © 2018年 kamangkeji. All rights reserved.
//

#import "HomeCommendModel.h"
#import "HomeCommendDetailModel.h"

@implementation HomeCommendModel

- (instancetype)initWithDict:(NSDictionary *)dict
{
    if (self = [super init]) {
        self.advertImage = dict[@"advertImage"];
        self.levelName = dict[@"levelName"];
        self.type = dict[@"type"];
        NSMutableArray *arr = [NSMutableArray array];
        for (NSDictionary *sDict in dict[@"detailList"]) {
            HomeCommendDetailModel *dModel = [HomeCommendDetailModel objectWithDict:sDict];
            [arr addObject:dModel];
        }
        self.detailList = arr;
    }
    return self;
}

+ (instancetype)objectWithDict:(NSDictionary *)dict
{
    return [[HomeCommendModel alloc]initWithDict:dict];
}

@end
